package com.yn.courseselectionsystem.service.impl;

import com.yn.courseselectionsystem.dao.AppointmentDao;
import com.yn.courseselectionsystem.pojo.Appointment;
import com.yn.courseselectionsystem.pojo.Course;
import com.yn.courseselectionsystem.service.AppointmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @description: TODO
 * @author: Tokyo_God
 * @date: 2021/1/13 18:40
 * Role of:
 * @version: v1.0
 */
@Service
public class AppointmentServiceImpl implements AppointmentService {
    @Resource
    private AppointmentDao appointmentDao;

    @Override
    public int addAppointment(Appointment appointment) {
        return appointmentDao.addAppointment(appointment);
    }

    @Override
    public Appointment nextTakeTheCourse(Course course) {
        return appointmentDao.nextTakeTheCourse(course);
    }

    @Override
    public Appointment selAppointment(Integer userId, Integer courseId) {
        return appointmentDao.selAppointment(userId, courseId);
    }

    @Override
    public int upAppointmentTTWin(Appointment appointment) {
        return appointmentDao.upAppointmentTTWin(appointment);
    }
}
